package com.baidu.shoppingmall.role.dao;


import com.baidu.shoppingmall.role.domain.RolePO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface RoleDao extends BaseMapper<RolePO> {

    @Select("select * from tbl_role where id in ( select role_id from tbl_user_role_relation where user_id=#{id})")
    List<RolePO> queryRole(String id);
}
